﻿using RPAVIEW.util;
using RPAVIEW.views.controlLibrary;
using SUNRPA.CONTROLS.IMPL.domain.flowItemParam;
using System.Windows;
using System.Windows.Controls;

namespace RPAVIEW.views.EditPage.flows.OpenWebPageN {
    /// <summary>
    /// Advance.xaml 的交互逻辑
    /// </summary>
    public partial class Advance:BaseParamViewAction{
        public Advance() {
            InitializeComponent();
        }

        public override void UpdateSource() {
            this.loadExpireTime.GetBindingExpression(SelVarTextBox.text).UpdateSource();
            this.expireDealType.GetBindingExpression(ComboBox.SelectedIndexProperty).UpdateSource();
            this.browserPath.GetBindingExpression(SelVarTextBox.text).UpdateSource();
            this.waitWebPageLoad.GetBindingExpression(CheckBox.IsCheckedProperty).UpdateSource();
        }

        private void ConfigWait(object sender, System.Windows.RoutedEventArgs e) {
            bool? isMove = this.waitWebPageLoad.IsChecked;
            if(isMove == true) {
                this.row1.Height = GridLength.Auto;
                this.row2.Height = GridLength.Auto;
            } else {
                this.row1.Height = new GridLength(0);
                this.row2.Height = new GridLength(0);
            }
        }
    }
}
